<!DOCTYPE html>
<html>
  <head>
    <title>个人信息</title>
    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

    <!-- form 样式 -->
    <link href="__STATIC__/form/style.css" rel='stylesheet' type='text/css' />
    <link href="__STATIC__/form/font-awesome.css" rel="stylesheet"> 

    <link href="__STATIC__/form/animate.css" rel="stylesheet" type="text/css" media="all">
    <link href="__STATIC__/form/add.css" rel="stylesheet" type="text/css" media="all">


    <link rel="stylesheet" href="__STATIC__/mobile/css/weui.min.css">
	<link rel="stylesheet" href="__STATIC__/mobile/css/jquery-weui.css">
    <!-- <link rel="stylesheet" href="css/style.min.css"> -->
    <link rel="stylesheet" href="__STATIC__/mobile/css/demos.css">
    <link rel="stylesheet" href="__STATIC__/mobile/css/main.css">
    <link rel="stylesheet" href="__STATIC__/mobile/css/iconfont.css">
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=DA6Bw0637vf4t96C4GRhyPBMyplqG6zA"></script>
    <style>
    	.navbar {
		    height: 50px;
		    color: #000;
		    background: #ffd966;
		    position: fixed;
		    top: 0;
		    left: 0;
		    right: 0;
		    z-index: 99;
		    display: -webkit-box;
		    display: -ms-flexbox;
		    overflow: hidden;
		}
		.navbar .nav-wrap-left {
		    height: 100%;
		    width: 25%;
		    line-height: 50px;
		}
		.navbar .nav-wrap-left .nav-btn {
		    padding-right: 0;
		}
		.navbar .nav-btn {
		    padding: 0 0 0 10%;
		   	width: 90%;
		   	height: 100%;
		    display: block;
		    color: #000;
		    font-size: 14px;
		}
		/*a:active, a:focus, a:hover, a:visited {
		    color: #bbb;
		}*/
		a, a:hover, del, ins, s, u {
		    text-decoration: none;
		}
		.barbtn, a, button, em, input, textarea {
		    -webkit-tap-highlight-color: rgba(255,0,0,0);
		}
		a {
		    color: #222;
		    text-decoration: none;
		    outline: 0;
		}
		.navbar .nav-title {
			width: 50%;
		    height: 100%;
		    overflow: hidden;
		    line-height: 50px;
		    text-align: center;
		    -webkit-box-flex: 1;
		    -ms-flex: 1;
		}
		.navbar .nav-wrap-right {
		    height: 100%;
		    width: 25%;
		    line-height: 50px;
		    text-align: right;
		}
		.filterbar .dropdown-toggle.active {
		    color: #179b16;
		}
		.icon-xuanzechengshi {
			font-size: 8px!important;
		}
		#joblist .list-item .salary span, #loadMore .list-item .salary span, #recommend-job .list-item .salary span {
		    color: #179b16;
		    font-size: .42rem;
		}
		.pic {
			width: 55px!important;
		}
		.pic img{
			width: 55px!important;
			height: 55px;
		}
		.filterbar .dropdown-wrapper {
		    position: absolute;
		    width: 100%;
		    z-index: inherit;
		}
		.filterbar .nav {
		    position: relative;
    		z-index: inherit;
		}
		.block {
			display: block;
		}
		.none {
			display: none;
		}
		.filterbar .nav {
		    display: -webkit-box;
		    display: -ms-flexbox;
		    background: #fff;
		    border-bottom: 1px solid #e5e5e5;
		    text-align: center;
		    height: .86rem;
		    line-height: .86rem;
		    -webkit-user-select: none;
		    font-size: 13px;
		    text-align: center;
		}
		.main {
			/*padding: 0!important;*/
			padding-top: 50px; 
			z-index: 9999999;
		}
		.filterbar .category-wrapper {
		    overflow: scroll;
		}
		.category-wrapper {
			max-height: 480px!important;
		}
		.  .top-logo img{
      border-radius: 50%;
    }
    /*.weui-uploader__file {
        width: 40%;
        height: 79px;
    }*/
    .top-logo {
        width: 100%;
        height: 8em;
        margin-top: 1em;
        overflow: hidden;
    }
    .top-logo img {
        width: 6em;
        height: 6em;
        margin: 1em auto;
        display: block;
    }
    .weui-cell2:after {
        content: " ";
        position: absolute;
        left: 0;
        right: 0;
        height: 1px;
        color: #d9d9d9;
        bottom: 0;
        border-bottom: 1px solid #d9d9d9;
        -webkit-transform-origin: 0 100%;
        transform-origin: 0 100%;
        -webkit-transform: scaleY(.5);
        transform: scaleY(.5);
    }
    /*.weui-uploader__file {
          float: left;
          background: no-repeat 50%;
          background-size: cover;
          display: inline-block;
          margin: 0px 5%;
          background-size: 100% 100%;
      }*/
    .weui-cells {
	    margin-top: 0.2em;
	}
            .dis{
                -webkit-text-fill-color:black; -webkit-opacity:1; opacity: 1;
            }
	.building_item {
	    width: 33.33%;
	    height: auto;
	    overflow: hidden;
	    float: left;
	    text-align: center;
	    font-size: 15px;
	}
	li {
		list-style: none;
	}
    </style>
  </head>

  <body ontouchstart style="background: #fff">
  	
    <div class="navbar">
         <div class="nav-wrap-left">
              
        </div>
		<div class="nav-title">个人信息</div>
		<div class="nav-wrap-right">
            
        </div>
    </div>
    <!-- 正文 -->
    <div class="main">
    
    	<div class="weui-cells weui-cells_form">
    		<div class="weui-cell">
		        <div class="weui-cell__hd"><label class="weui-label">姓名</label></div>
		        <div class="weui-cell__bd">
		            <input id="user_name" class="weui-input dis" type="text" placeholder="请输入姓名" value="{$info.name}" disabled>
		        </div>
		    </div>
		    <div class="weui-cell">
	          	<div class="weui-cell__hd"><label for="name" class="weui-label">性别</label></div>
          		<div class="weui-cell__bd">
					<if condition="$info['sex'] eq 1">
						<input id="user_name" class="weui-input dis" type="text" placeholder="请输入姓名" value="男" disabled>
						<else/>
	             	<input id="user_name" class="weui-input dis" type="text" placeholder="请输入姓名" value="女" disabled>
						</if>
	          	</div>
        	</div>
        	<div class="weui-cell">
		        <div class="weui-cell__hd"><label for="name" class="weui-label">现居城市</label></div>
		        <div class="weui-cell__bd">
		        	
                    <input id="user_name" class="weui-input dis" type="text" placeholder="请输入现居城市" value="{$info.province} {$info.addr}" disabled>
		        </div>
		    </div>
    		
		    <div class="weui-cell">
		        <div class="weui-cell__hd"><label class="weui-label">手机号</label></div>
		        <div class="weui-cell__bd">
		          <input id="user_phone" class="weui-input dis" type="tel" placeholder="请输入手机号" value="{$info.phone_num}" disabled>
		        </div>
		    </div>
		    <div class="weui-cell">
		        <div class="weui-cell__hd"><label class="weui-label">学校名称</label></div>
		        <div class="weui-cell__bd">
		          <input id="user_school" class="weui-input dis" type="text" placeholder="毕业学校名称" value="{$info.school}" disabled>
		        </div>
		    </div>
		    <div class="weui-cell">
		        <div class="weui-cell__hd"><label class="weui-label">身份证号</label></div>
		        <div class="weui-cell__bd">
					<input id="user_idCard"  class="weui-input dis"  placeholder="请输入身份证号"type="text" maxlength="18" onkeyup="value=value.replace(/^[a-zA-Z]+\D*|^\d{0,16}[a-zA-Z]+|[^0-9Xx]/g,'') " onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" value="{$info.card_num}" disabled/>
		        </div>
		    </div>
            <!--
            <div class="weui-cell">
                <div class=""><label class="" >上传身份证</label></div>
                <empty name="img">
                    <div class="weui-uploader__bd" style="padding: 10px;width: 100%;box-sizing: border-box;">
                        
                        <div class="weui-uploader__input-box">
                            <span id="uploaderInput1" class="weui-uploader__input" >
                        </div>
                    </div>
                <else />
                    <div class="weui-uploader__bd" style="padding: 10px;width: 100%;box-sizing: border-box;">
                        <ul class="weui-uploader__files" id="uploaderFiles1" >
                            <li class="weui-uploader__file" style="background-image:url(http://house.wechatpic.com/upload/weixin/{$img}"></li>
                        </ul>
                        
                    </div>
                </empty>
            </div>
            
            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">身份证上传</label></div>
                <div class="form-group">
                
                    <div class="ipt image_container">
                        <if condition='$info.img eq null'>
                            <img src="__STATIC__/vote_042.png" alt="" id="preview">
                            <input type="file" name='logo' id="exampleInputFile1" class="file_upload">
                        <else/>
                            <img src="http://house.wechatpic.com/upload/loupan/{$info.img}" alt="" id="preview">
                            <input type="file" name='logo' id="exampleInputFile1" class="file_upload">
                        </if>
                    </div>
                </div>
            </div>
            -->
		    <div class="weui-cell">
		        <div class="weui-cell__hd"><label class="weui-label">开户银行</label></div>
		        <div class="weui-cell__bd">
		          <input id="user_bankcard" class="weui-input dis" type="text" value="{$info.bank}" disabled>
		        </div>
		    </div>
		    <div class="weui-cell">
		        <div class="weui-cell__hd"><label class="weui-label">工资卡号</label></div>
		        <div class="weui-cell__bd">
		          <input id="user_bankid" class="weui-input dis" type="tel"  value="{$info.bank_num}" disabled>
		        </div>
		    </div>
		    <div class="weui-cell weui-cell_vcode">
          		<div class="weui-cell__hd">
            		<label class="weui-label">银行预留号码</label>
          		</div>
          		<div class="weui-cell__bd">
            		<input id="user_bankphone" class="weui-input dis" type="tel"  value="{$info.bank_phone}" disabled>
          		</div>
          		
        	</div>

        	
		    <div class="weui-cell">
		        <div class="weui-cell__hd"><label class="weui-label">支付宝姓名</label></div>
		        <div class="weui-cell__bd">
		          <input id="user_ailpayname" class="weui-input dis" type="text" placeholder="请输入支付宝姓名" value="{$info.alipay_name}" disabled>
		        </div>
		    </div>
		    <div class="weui-cell">
		        <div class="weui-cell__hd"><label class="weui-label">支付宝帐号</label></div>
		        <div class="weui-cell__bd">
		          <input id="user_ailpaynum" class="weui-input dis" type="text" placeholder="请输入支付宝帐号" value="{$info.alipay_account}" disabled>
		        </div>
		    </div>
		    <div class="weui-cell">
		        <div class="weui-cell__hd"><label class="weui-label">紧急联系人</label></div>
		        <div class="weui-cell__bd">
		          <input id="user_emergencyName" class="weui-input dis"  type="text" placeholder="请输入紧急联系人" value="{$info.finder}" disabled>
		        </div>
		    </div>
		    <div class="weui-cell">
		        <div class="weui-cell__hd"><label class="weui-label">紧急联系方式</label></div>
		        <div class="weui-cell__bd">
		          <input id="user_emergencyNum" class="weui-input dis" type="tel" placeholder="请输入紧急联系方式" value="{$info.finder_phone}" disabled>
		        </div>
                <input type='hidden' id='code' value='' disabled>
		    </div>

	  	</div>
		<div class="weui-btn-area">
	      <a class="weui-btn weui-btn_primary" href="{:U('myInfo')}?type=1" >修改</a>
	    </div>
        <script src="__STATIC__/mobile/js/jquery-2.1.4.js"></script>
        <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
		<!--表单验证-->
        <script>
		/*根据身份证号码获取年龄*/
        function IdCard(UUserCard,num){
            if(num==1){
                //获取出生日期
                birth=UUserCard.substring(6, 10) + "-" + UUserCard.substring(10, 12) + "-" + UUserCard.substring(12, 14);
                return birth;
            }
            if(num==2){
                //获取性别
                if (parseInt(UUserCard.substr(16, 1)) % 2 == 1) {
                    //男
                    return "男";
                } else {
                    //女
                    return "女";
                }
            }
            if(num==3){
                //获取年龄
                var myDate = new Date();
                var month = myDate.getMonth() + 1;
                var day = myDate.getDate();
                var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1;
                if (UUserCard.substring(10, 12) < month || UUserCard.substring(10, 12) == month && UUserCard.substring(12, 14) <= day) {
                    age++;
                }
                return age;
            }
        }
	var wait=60;
	function time(o) {
		if (wait == 0) {
			o.removeAttribute("disabled");   
			o.value="获取验证码";
			wait = 60;
		} else { 
			o.setAttribute("disabled", true);
			o.value="重新发送(" + wait + ")";
			wait--;
			setTimeout(function() {
				time(o)
			},1000)
		}
	}	
        //获取验证
        $('#vcodeBtn').click(function(){
            var mobile = $('#user_bankphone').val();
            if(mobile == ''){
                alert('请先输入预留手机号哦!');return false;
            }
            if(!(/^1[3|4|5|7|8]\d{9}$/.test(mobile))){ 
                    alert("手机号码格式有误，请重填");  
                    return false; 
                }
            $('.weui-cell__ft').hide();
            $('.has-send').show();
            time(this)
	$.ajax({
		url:"http://house.wechatpic.com/Mobile/My/getCode",
		data:{mobile:mobile},
		type:"GET",
		dataType:"JSON",
		success:function(res){
			if(res){
				$("#code").val(res.code);
                
			}
		}
	})
        })
        $('#updateInfo').click(function(){
            var user_name = $('#user_name').val();
            if(user_name == ''){
                alert('请输入姓名');return false;
            }
            var user_sex = $('#user_sex').val();
            if(user_sex == ''){
                alert('请选择性别');return false;
            }
            var user_address = $('#user_address').val();
            if(user_address == ''){
                alert('请选择地址');return false;
            }
            var user_phone = parseInt($('#user_phone').val());
            if(user_phone == ''){
                alert('请输入手机号');return false;
            }
            if(!(/^1[3|4|5|7|8]\d{9}$/.test(user_phone))){ 
                    alert("手机号码格式有误，请重填");  
                    return false; 
                }
            var user_school = $('#user_school').val();
            if(user_school == ''){
                alert('请输入毕业学校名称');return false;
            }
            var user_idCard = $('#user_idCard').val();
            if(user_idCard == ''){
                alert('请输入身份证号');return false;
            }
            var user_bankcard = $('#user_bankcard').val();
            if(user_bankcard == ''){
                alert('请输入开户银行');return false;
            }
            var user_bankid = $('#user_bankid').val();
            if(user_bankid == ''){
                alert('请输入开户银行');return false;
            }
            var user_bankphone = $('#user_bankphone').val();
            if(user_bankphone == ''){
                alert('请输入预留号码');return false;
            }
            if(!(/^1[3|4|5|7|8]\d{9}$/.test(user_bankphone))){ 
                    alert("预留号码格式有误，请重填");  
                    return false; 
                }
            var user_vcode = $('#user_vcode').val();
            var code = $('#code').val();
            //alert(user_vcode);alert(code);
            if(user_vcode == ''){
                alert('请输入验证吗');return false;
            }
            if(user_vcode != code){
                alert('请输入正确验证码');return false;
            }
            var user_ailpayname = $('#user_ailpayname').val();
            if(user_ailpayname == ''){
                alert('请输入支付宝姓名');return false;
            }
            var user_ailpaynum = $('#user_ailpaynum').val();
            if(user_ailpaynum == ''){
                alert('请输入支付宝帐号');return false;
            }
            var user_emergencyName = $('#user_emergencyName').val();
            if(user_emergencyName == ''){
                alert('请输入紧急联系人');return false;
            }
            var user_emergencyNum = $('#user_emergencyNum').val();
            if(user_emergencyNum == ''){
                alert('请输入紧急联系方式');return false;
            }
            if(!(/^1[3|4|5|7|8]\d{9}$/.test(user_emergencyNum))){ 
                    alert("紧急联系方式格式有误，请重填");  
                    return false; 
                }
            var ages= IdCard(user_idCard,3);
            $.ajax({         
                    url: "http://house.wechatpic.com/Mobile/My/addInfo",
                    type:'GET', 
                    dataType : "json", 
                    data: {user_name:user_name,user_sex:user_sex,user_address:user_address,user_phone:user_phone,user_school:user_school,user_idCard:user_idCard,ages:ages,user_bankcard:user_bankcard,user_bankid:user_bankid,user_bankphone:user_bankphone,user_vcode:user_vcode,user_ailpayname:user_ailpayname,user_ailpaynum:user_ailpaynum,user_emergencyName:user_emergencyName,user_emergencyNum:user_emergencyNum},
                     success: function (res) { 
                             if(res.res == 1){
                                alert(res.msg);
                                location.reload();
                             }else{
                                alert(res.msg);return false;
                             }
                       },
                       error:function(){
                        alert('请求提交失败');
                       }  
               }); 
        })

        </script>
		<div class="weui-cells weui-cells_form" style="margin-bottom: 100px;">
	  		<div style="text-align: center;padding: 5px 0;background: #ffd966;color: #000;font-family: "黑体";">兼职记录</div>
		    <div id="joblist" style="min-height: 10px">
	        	<div class="shade" style="display: none;"></div>
	            <ul id="job-all" class="list demos-content-padded" style="min-height: 10px">
                <foreach name="h_info" item="vo" >
                <a href="{:U('myInfo2')}?aid={$vo['a_id']}">
	            	<li style="overflow: hidden;">
	                	<!-- <a class="list-item clearfix"> -->
	                        <div class="building_item">
	                            {$vo['aname']}
	                        </div>
	                        <div class="building_item">
	                            {$vo['name']}
	                        </div>
	                        <div class="building_item">
	                        	{$vo['create_time']|date="Y-m-d",###}
	                        </div>
	                        
	                    <!-- </a> -->
	           		</li>
                    </a>
	           	</foreach>
	            </ul>
	            
	        </div>

    	</div>
	  	</div>
    </div>
	<div id="allmap1"></div>
    <script>
  		$(function() {
      	var obj2 =["一路", "二路", "三路"];
        $("#adacitvity_name").select({
	        title: "线路",
	        multi: false,
	        min: 1,
	        // max: 3,
	        items: obj2,
	        beforeClose: function(values, titles) {
	          
	        },
	        onChange: function(d) {
	          console.log(this, d);
	        },
	        onClose: function (d) {
	          console.log('close')
	        }
      	});
      	$("#user_sex").select({
          title: "选择性别",
          items: [
            {
              title: "男",
              value: "1",
            },
            {
              title: "女",
              value: "2",
            }
          ]
       });
      	$("#user_address").cityPicker({
          title: "选择出发地",
          onChange: function (picker, values, displayValues) {
            console.log(values, displayValues);
          }
        });
  	});
    </script>
    <script src="__STATIC__/mobile/js/jquery-weui.js"></script>
    <script src="__STATIC__/mobile/js/city-picker.js"></script>
    <script src="__STATIC__/mobile/js/globalvariable.js"></script>
    <script src="__STATIC__/mobile/js/sose.js"></script>
    <script>
    
		
       

       
        
    </script>
  </body>
</html>
